<?php

namespace app\merchant\controller;

use app\common\model\Enterprise as EnterpriseModel;

class GoodsRentlist extends Common
{
	public function uploadGoodsRentlist()
	{
		$img_config = config('IMAGE_CONFIG');
		$model = new EnterpriseModel;
		$filename = $model->upload('enterprise_license_img', 'certificat', [[710, 400]]);
		$savePath = $img_config['certificat_img_path'] . $filename;
		// halt($savePath);
		// $savePath = str_replace('\\', '/', $savePath);
		$data = ['savepath'=>$savePath, 'filename'=> $filename];
		return json($data);
	}
}